Skip to content

ci: run the sweep's second version on its own stage, and Compose examples on the requested version - #829

Merged
czubocha merged 3 commits into
v4from
branch/dreamy-lamport-709whe
Nov 23, 2026
Merged

czubocha merged 3 commits into
v4from
branch/dreamy-lamport-709whe

Conversation

@czubocha

Copy link
Copy Markdown
Contributor

Summary

Two fixes to the nightly sweep live tests, and a time limit that fits them.

  • A separate stage for the second Framework version. The nightly job tests each example with the latest release and then with the canary. Both used the same stage, so the second deploy recreated the stage's IAM roles right after the first remove had deleted them. Lambda can reject a role that IAM has not finished propagating ("The role defined for the function cannot be assumed by Lambda"). The stage step now picks a second stage for the second version, and a second remove step clears it at the end of the job.
  • Compose examples run on the requested version. The CLI picks the version for a Compose run from serverless-compose.yml; a service's frameworkVersion is a range check. scripts/test-example.mjs wrote the version into the services only, so the canary run of compose-multiframework ran the latest release. The runner now also writes it into serverless-compose.yml in the copy it deploys and removes.
  • Job limit 100 minutes. Two versions at 15 minutes for the run and 15 for the remove, plus up to 20 minutes for each stage's final remove.

Test plan

  • npm test: 311 tests pass, including new tests for the second stage and its remove step, the version in serverless-compose.yml for a canary or numbered run (deploy and --remove-only), and the file left unchanged with latest. The Compose test fails without the runner change.
  • node scripts/test-example.mjs compose-multiframework --framework-version canary against AWS (eu-west-1): the CLI reports the canary build, the three services deploy, the check passes and all three are removed. The same command with latest passes on 4.46.0, and aws-node passes on the same canary.
  • After merge: the next nightly sweep run shows two stages per example and the canary version for compose-multiframework. A manual dispatch tests one version only.

Generated by Claude Code

Redeploying a stage right after removing it recreates its IAM roles under the same names, and Lambda can reject a role IAM has not finished propagating. The second version now deploys to a new stage, and both stages are removed at the end of the job.
The CLI picks the version for a Compose run from serverless-compose.yml; a service's frameworkVersion is only a range check. The runner now writes the version into serverless-compose.yml as well, so a canary run of a Compose example uses the canary.
Two versions at 15 minutes for the run and 15 for the remove, plus up to 20 minutes for each stage's final remove: the job limit is now 100 minutes.
@czubocha
czubocha merged commit 2cfb582 into v4 Nov 23, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant